package com.xinqi.modules.databank.v2.manager.impl;

import com.xinqi.common.mybatis.data.service.impl.BaseServiceImpl;
import com.xinqi.modules.databank.dto.rsp.ResourceInteractionLogResultDTO;
import com.xinqi.modules.databank.v2.domain.CourseResourceInteractionLogEntity;
import com.xinqi.modules.databank.v2.manager.ResourceInteractionLogManager;
import com.xinqi.modules.databank.v2.mapper.CourseResourceInteractionLogMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资料库提问-Manager层
 * @author dzy
 */
@Service
@RequiredArgsConstructor
public class ResourceInteractionLogManagerImpl extends BaseServiceImpl<CourseResourceInteractionLogMapper, CourseResourceInteractionLogEntity> implements ResourceInteractionLogManager {

    private final CourseResourceInteractionLogMapper resourceInteractionLogMapper;


    /**
     * 获取学生答题数据
     * @author czy
     */
    @Override
    public List<ResourceInteractionLogResultDTO> findList(Long contentId, Long partId) {
        return resourceInteractionLogMapper.findList(contentId, partId);
    }

    /**
     * 获取学生答题人数
     * @author czy
     */
    @Override
    public Integer findCount(Long contentId, Long partId) {
        return resourceInteractionLogMapper.findCount(contentId, partId);
    }

}
